<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta charset="utf-8">

		<link rel="stylesheet" href="css/layui1.css" />
		<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
		<link rel="stylesheet" href="css/login.css" />
		<script src='https://libs.baidu.com/jquery/1.10.2/jquery.min.js'></script>
		<script src="bootstrap/js/bootstrap.min.js"></script>
		<script>
			$(document).ready(function() {
				//打开会员登录 
				$("#Login_start_").click(function() {
					$("#regist_container").hide();
					$("#_close").show();
					$("#_start").animate({
						left: '350px',
						height: '520px',
						width: '400px'
					}, 500, function() {
						$("#login_container").show(500);
						$("#_close").animate({
							height: '40px',
							width: '40px'
						}, 500);
					});
				});
				//打开会员注册
				$("#Regist_start_").click(function() {
					$("#login_container").hide();
					$("#_close").show();
					$("#_start").animate({
						left: '350px',
						height: '520px',
						width: '400px'
					}, 500, function() {
						$("#regist_container").show(500);
						$("#_close").animate({
							height: '40px',
							width: '40px'
						}, 500);
					});
				});
				//关闭
				$("#_close").click(function() {
					
					$("#_close").animate({
						height: '0px',
						width: '0px'
					}, 500, function() {
						$("#_close").hide(500);
						$("#login_container").hide(500);
						$("#regist_container").hide(500);
						$("#_start").animate({
							left: '0px',
							height: '0px',
							width: '0px'
						}, 500);
					});
				});
				//去 注册
				$("#toRegist").click(function(){
					$("#login_container").hide(500);
					$("#loginByCode").hide(500);
					$("#reset_password").hide(500);
					$("#regist_container").show(500);
				});
				//去 登录
				$("#toLogin").click(function(){
					$("#regist_container").hide(500);
					$("#loginByCode").hide(500);
					$("#reset_password").hide(500);
					$("#login_container").show(500);
				});
				//去 验证码登录
				$("#toLoginBycode").click(function(){
					$("#login_container").hide(500);
					$("#regist_container").hide(500);
					$("#reset_password").hide(500);
					$("#loginByCode").show(500);
				});
				//返回密码 登录
				$("#toPassLogin").click(function(){
					$("#loginByCode").hide(500);
					$("#regist_container").hide(500);
					$("#reset_password").hide(500);
					$("#login_container").show(500);
				});
				//找回密码
				$("#toReset").click(function(){
					$("#loginByCode").hide(500);
					$("#regist_container").hide(500);
					$("#login_container").hide(500);
					$("#reset_password").show(500);
				});
				//返回登录
				$("#returnLogin").click(function(){
					$("#regist_container").hide(500);
					$("#loginByCode").hide(500);
					$("#reset_password").hide(500);
					$("#login_container").show(500);
				});
			});
		</script>
	</head>

	<body>
<div class="demo">

		<!-- 会员登录  -->
		<!--<div id='Login_start' style="position: absolute;" >-->
		<div class="abc">
		<div id='_start'>
			<div id='_close' style="display: none;">
				<span class="glyphicon glyphicon-remove"></span>
			</div>
			<br /> 
			<!--登录框-->
			<div id="login_container">
				<div id="lab1">
					<span id="lab_login">平台登录</span>

				</div>
				<div style="width:330px;">
					<span id="lab_type1">密码登陆</span>
				</div>
				<div id="form_container1">
					<br />
					<form class="layui-form">
					<input type="text" class="form-control" placeholder="手机号/用户名" id="login_number" value="admin" />
					<input type="password" class="form-control" placeholder="密码" id="login_password" />
		<!--			<input type="button" value="登录" class="btn btn-success" id="login_btn" />-->
					<button type="button" class="layui-btn layui-btn-radius" id="login_btn">登录</button>
					<span id="rememberOrfindPwd">
						<div class="layui-form-item">
						    <label class="layui-form-label" style="line-height: 50px;color:#000000">记住我</label>
						    <div class="layui-input-block">
						      <input type="checkbox" checked="" name="open" lay-skin="switch" lay-filter="switchTest" lay-text="ON|OFF" id="rm">
						    </div>
						  </div>
					
					</span>

				</form>


				</div>
			</div>

			</div>
		</div>
</div>
	</body>
	<script type="text/javascript" src="layui/layui.js" ></script>
	<script type="text/javascript">
		//我们强烈推荐你在代码最外层把需要用到的模块先加载
		layui.use(['layer', 'form', 'element'], function(){
			var layer = layui.layer
					,form = layui.form
					,element = layui.element

			//……
			//你的代码都应该写在这里面
			form.render();
		});

	</script>
	<script type="text/javascript">

			//打开会员登录 
					$("#regist_container").hide();
					$("#_close").show();
					$("#_start").animate({
						left: '350px',
						height: '520px',
						width: '400px'
					}, 500, function() {
						$("#login_container").show(500);
						$("#_close").animate({
							height: '40px',
							width: '40px'
						}, 500);
					});


			//会员登录-账号密码登录
			$("#login_btn").click(function(){
				var login_number = $("#login_number").val();
				var login_password = $("#login_password").val();
				//根据不同的用户类型匹配对应的请求

					$.ajax({
						url:"/platformVerify/platformLoginByAccount",
						type:"post",
						data:{
							account:login_number,
							pPassword:login_password,
							UserType:3
						},
						dataType:"json",
						success:function(data) {
							if (data.msg.indexOf("成功")!=-1) {
									//是新用户，跳转到信息完善界面
									window.location.href="/html/platform.html";

							}else{
								layer.alert(data.msg);
							}
						}

					});

			});
			

		
	</script>

</html>